package com.sg.dto.integration.calc;

import com.sg.common.dto.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.Objects;

/**
 * @desc NextCyclePeriodDataDto
 * @使用场景
 */
@Data
public class NextCyclePeriodDataDto extends BaseDto implements Serializable {

    /**
     * 数据结果ID
     */
    @ApiModelProperty("数据结果ID ")
    private String dataResultId;

    /**
     * 数据值结果
     */
    @ApiModelProperty("数据值结果")
    private Double dataResult;

    /**
     * 操作时间
     */
    @ApiModelProperty("操作时间")
    private Date operateTime;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        NextCyclePeriodDataDto that = (NextCyclePeriodDataDto) o;
        return (
                dataResultId == that.dataResultId &&
                        dataResult == that.dataResult &&
                        operateTime == that.operateTime
        );
    }

    @Override
    public int hashCode() {
        return Objects.hash(
                super.hashCode(),
                dataResultId,
                dataResult,
                operateTime
        );
    }

}
